24. For the purposes of the calculation referred to in section 23, revenues derived from activity as a financial agent shall be determined by deducting investment revenues, interest on deposits and borrowings and adding or subtracting any gains or losses on investments and gains or losses on term contracts and options.
That part of such revenues earned in Québec shall be calculated by multiplying the amount resulting from the calculation made under the first paragraph by the average balance of deposits accepted in Québec and dividing the result by the average balance of the total deposits. The average balance of deposits shall be calculated by dividing by 2 the balance of deposits at the end of the preceding year and the balance of deposits at the end of the current year.